
                    <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                        <div class="table-responsive">

                            <table class="table table-bordered table-hover" style="font-size:12px;">
                                <thead>
                                <tr>
                                    <td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);"></td>
                                    <td class="text-center">
                                       序号
                                    </td>
                                    <td class="text-center">
                                        <a href="javascript:sort('order_sn');">订单编号</a>
                                    </td>
                                    <td class="text-center">
                                        <a href="javascript:sort('consignee');">会员名称</a>
                                    </td>
                                    <td class="text-center">
                                       商品名称
                                    </td>
                                    <td class="text-center">
                                       购买数量
                                    </td>
                                    <td class="text-center">
                                        <a href="">总金额</a>
                                    </td>      
                                    <td class="text-center">
                                        <a href="">已付金额</a>
                                    </td>
                                    <td class="text-center">
                                        <a href="">欠款金额</a>
                                    </td>
                                    <td class="text-center">
                                        <a href="javascript:sort('order_status');">订单状态</a>
                                    </td>
                                    <td class="text-center">支付状态</td>
                                    <td class="text-center">理疗师</td>
                                    <td class="text-center">医生</td>
                                    <td class="text-center">支付方式</td>
                                    <td class="text-center">发药状态</td>
                                    <td class="text-center">
                                        <a href="javascript:sort('add_time');">下单时间</a>
                                    </td>
                                    <td class="text-center">操作</td>
                                </tr>
                                </thead>
                                <tbody><?php $n = $a;?>
                                <volist name="orderList" id="list" key='k'>
                                    <tr>

                                        <td class="text-center">
                                        	<input type="checkbox" name="selected[]" value="6">
                                        	<input type="hidden" name="shipping_code[]" value="flat.flat">
                                        </td>
                                        <td><?php
                                echo $n;
                                $n++;
                            ?></td>
                                        <td class="text-center">{$list.order_sn}</td>
                                        <td class="text-center">{$list.consignee}:{$list.mobile}</td>
                                        <td class="text-center"><?php
                                        foreach($list['goods_name'] as $k => $v) {
                                            echo $v['goods_name'];
                                            echo ' ';

                                        }
                                        ?></td>
                                        <td class="text-center">{$list.goods_num}</td>
                                        <td class="text-center">{$list.total_amount}</td>
                                         <td class="text-center">
                                         <?php
                                        if($list['order_status']=='6'){
                                            echo $list['yajin'];
                                        }else{
                                            echo $list['total_amount'];
                                        }
                                        
                                         ?>

                                       </td>
                                        <td class="text-center">
                                        <?php
                                            if($list['order_status']=='6'){
                                             echo $list['order_amount1'];
                                        }else{
                                             echo '0.00';
                                        }
                                        ?>
                                         
                                       </td>
                                        <td class="text-center">{$order_status[$list[order_status]]}<if condition="$list['is_cod'] eq '1'"><span style="color: red">(货到付款)</span></if></td>
                                        <td class="text-center">{$pay_status[$list[pay_status]]}</td>
                                        <td class="text-center">{$list.nickname}</td>
                                        <td class="text-center">{$list.doctor_id}</td>
                                        <td class="text-center">{$list.pay_name}</td>
                                        <td class="text-center"><if condition="$list['shipping_status'] eq '0'">未发货<elseif condition="$list['shipping_status'] eq '1' "/>自提<else/>物流配送</if></td>
                                        <td class="text-center">{$list.add_time|date='Y-m-d H:i',###}</td>
                                        <td class="text-center">
                                        <if condition="$list.master_order_sn neq '' ">
                                        <a href="{:U('order/detail',array('order_id'=>$list['id'],'order_id1'=>$list['order_id']))}" data-toggle="tooltip" title="" class="btn btn-info" data-original-title="查看详情"><i class="fa fa-eye"></i></a>
                                        <else/>
                                        <a href="{:U('order/detail',array('order_id'=>$list['order_id']))}" data-toggle="tooltip" title="" class="btn btn-info" data-original-title="查看详情"><i class="fa fa-eye"></i></a>
                                        </if>
                                           <if condition="($list['order_status'] eq 3) or ($list['order_status'] eq 5) or ($list['order_status'] eq 8) or ($list['order_status'] eq 9)">
                                             <a href="{:U('order/delete_order',array('order_id'=>$list['order_id']))}"  data-toggle="tooltip" class="btn btn-danger" title="删除"><i class="fa fa-trash-o"></i></a>
                                           <else/>
                                        	<a href="javascript:void(0)" onclick="alert('该订单不得删除')" data-toggle="tooltip" class="btn btn-default" title="删除"><i class="fa fa-trash-o"></i></a>
                                           </if>
                                        </td>
                                    </tr>

                                </volist>
                                 <tr>
                                    <td class="text-center" colspan="2">合计</td>
                                   
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td class="text-center">{$tj['sl']}</td>
                                    <td class="text-center">{$tj['zj']}</td>
                                    <td class="text-center">{$tj['ys']}</td>
                                    <td class="text-center">{$tj['qk']}</td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                 </tr>
                                </tbody>
                            </table>
                        </div>
                    </form>
                    <div class="row">
                        <div class="col-sm-6 text-left"></div>
                        <div class="col-sm-6 text-right">
                        <if condition="$arr['order_status'] eq '1'">订单总金额:{$arr.total_price}元 已收金额:{$arr.total_price}元 
                        <elseif condition="$arr['order_status'] eq '0'"/>
                        <elseif condition="$arr['order_status'] eq '6'"/>订单总金额:{$arr.total_price}元 已收押金:{$arr.yajin}元 应付金额{$arr.order_amount1}<else/>订单总金额:{$arr.total_price}元  
                        </if>
                        {$page}
                        </div>
                    </div>
<script>
    $(".pagination  a").click(function(){
        var page = $(this).data('p');
        ajax_get_table('search-form2',page);
    });
</script>